package com.spa.domain.service;

import com.spa.domain.entity.MsgAlarmLog;
import com.spa.infrastructure.mapper.MsgAlarmLogMapperStruct;
import com.spa.infrastructure.repository.condition.MsgAlarmLogCondition;
import com.spa.infrastructure.repository.po.MsgAlarmLogPO;
import com.spa.infrastructure.repository.service.MsgAlarmLogRepositoryService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * (MsgAlarmLog)服务实现类
 *
 * @author makejava
 * @since 2024-01-11 11:34:34
 */
@Service
public class MsgAlarmLogService {


    @Resource
    private MsgAlarmLogRepositoryService msgAlarmLogRepositoryService;

    public List<MsgAlarmLog> listInfo(MsgAlarmLogCondition condition) {

        List<MsgAlarmLogPO> list = msgAlarmLogRepositoryService.listInfo(condition);
        List<MsgAlarmLog> pageEntity = MsgAlarmLogMapperStruct.INSTANCE.po2Entity4List(list);

        return pageEntity;
    }

    public void add (Long orderId,Long massagistId,String exactLocation){
        MsgAlarmLog po = new MsgAlarmLog();
        po.setOrderId(orderId);
        po.setMassagistId(massagistId);
        po.setExactLocation(exactLocation);
        msgAlarmLogRepositoryService.add(po);
    }

}
